#!/bin/bash
id=`ps -ef | grep LinuxSpringBoot-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{print $2}'`
if ((id>0))
then
  kill -s 9 $id
fi
`nohup java -jar /root/JavaProject/LinuxSpringBoot/target/LinuxSpringBoot-0.0.1-SNAPSHOT.jar > /tmp/demo$id.log 2>&1 &`